package cn.col.gszf.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description 投票实体
 * @Author: wanghong
 * @Date: 2024/6/17
 */
@Data
@TableName(value = "vote")
public class Vote implements Serializable{
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    private List<VoteOptions> voteOptionsList;

    @TableField("channel_id")
    private Integer channelId;

    @TableField("title")
    private String title;

    @TableField("total_voting")
    private Integer totalVoting;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_at")
    private LocalDateTime createAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_at")
    private LocalDateTime updateAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("start_time")
    private LocalDateTime startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("end_time")
    private LocalDateTime endTime;
}
